/*    */ package andriod.action.interceptor;
/*    */ 
/*    */ import com.jcrj.entity.OUser;
/*    */ import com.opensymphony.xwork2.ActionContext;
/*    */ import com.opensymphony.xwork2.ActionInvocation;
/*    */ import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
/*    */ import java.util.Map;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import org.apache.struts2.ServletActionContext;
/*    */ 
/*    */ public class SessionInterceptor extends AbstractInterceptor
/*    */ {
/*    */   private static final long serialVersionUID = 1L;
/*    */ 
/*    */   public String intercept(ActionInvocation invocation)
/*    */     throws Exception
/*    */   {
/* 16 */     if (!ServletActionContext.getRequest().isRequestedSessionIdValid()) {
/* 17 */       return "loginClose_andriod";
/*    */     }
/* 19 */     OUser user = 
/* 20 */       (OUser)invocation.getInvocationContext().getSession()
/* 20 */       .get("userInfo");
/* 21 */     if (user == null) {
/* 22 */       return "loginClose_andriod";
/*    */     }
/* 24 */     return invocation.invoke();
/*    */   }
/*    */ }